/**
 * @Author: hcc
 * @Date: 2022-04-08
 * @Last Modified by: hcc
 * @Last Modified time: 2022-04-08
 */
const RouteView = () => import('@/layout/RouteView');
// 异步路由组件加载
const AsyncComponent = __name__ => () => import(`@/pages/${__name__}`);

// 菜单路由
const menuRoutes = [
  {
    path: '/omSaleP',
    meta: {
      title: '销售管理',
      icon: 'el-icon-s-tools'
    },
    redirect: '/omSaleP',
    component: RouteView,
    children: [
      {
        path: '/omSaleP/salesPlan',
        meta: {
          title: '销售计划管理'
        },
        redirect: '/omSaleP/salesPlan',
        component: RouteView,
        children: [
          {
            path: '/omSaleP/salesPlan/MonthPlanImport',
            meta: {
              title: '月度目标导入',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/salesPlan/MonthPlanImport')
          },
          {
            path: '/omSaleP/salesPlan/MonthPlanQuery',
            meta: {
              title: '月度目标查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/salesPlan/MonthPlanQuery')
          },
          {
            path: '/omSaleP/salesPlan/NormalPlanQuery',
            meta: {
              title: '常规计划查看',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/salesPlan/NormalPlanQuery')
          },
          {
            path: '/omSaleP/salesPlan/GoalAccomplished',
            meta: {
              title: '目标及完成情况分析',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/salesPlan/GoalAccomplished')
          }
        ]
      },
      {
        path: '/omSaleP/vehicleParameters',
        meta: {
          title: '整车基础参数管理'
        },
        redirect: '/omSaleP/vehicleParameters',
        component: RouteView,
        children: [
          {
            path: '/omSaleP/vehicleParameters/RebateRulesSet',
            meta: {
              title: '折扣政策设置',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/vehicleParameters/RebateRulesSet')
          },
          {
            path: '/omSaleP/vehicleParameters/businessParameters',
            meta: {
              title: '业务参数维护',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/vehicleParameters/businessParameters')
          },
          {
            path: '/omSaleP/vehicleParameters/vehicleMaterials',
            meta: {
              title: '整车物料查看',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/vehicleParameters/vehicleMaterials')
          },
          {
            path: '/omSaleP/vehicleParameters/vehicleSpecialPrice',
            meta: {
              title: '整车特殊采购价格维护',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/vehicleParameters/vehicleSpecialPrice')
          },
          {
            path: '/omSaleP/vehicleParameters/materialPrice',
            meta: {
              title: '整车物料价格查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/vehicleParameters/materialPrice')
          },
          {
            path: '/omSaleP/vehicleParameters/PlanOrderTime',
            meta: {
              title: '计划提报时间设置',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/vehicleParameters/PlanOrderTime')
          }
        ]
      },
      {
        path: '/omSaleP/OrderManagement',
        meta: {
          title: '订单管理'
        },
        redirect: '/omSaleP/OrderManagement',
        component: RouteView,
        children: [
          {
            path: '/omSaleP/OrderManagement/OrderImport',
            meta: {
              title: '总部订单导入',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/OrderManagement/OrderImport')
          },
          {
            path: '/omSaleP/OrderManagement/PurchaseOrder',
            meta: {
              title: '订单审核确认',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/OrderManagement/PurchaseOrder')
          },
          {
            path: '/omSaleP/OrderManagement/OrderDetailQuery',
            meta: {
              title: '订单明细查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/OrderManagement/OrderDetailQuery')
          },
          {
            path: '/omSaleP/OrderManagement/ShipmentOrderQuery',
            meta: {
              title: '货运单查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/OrderManagement/ShipmentOrderQuery')
          },
          {
            path: '/omSaleP/OrderManagement/MonthlySales',
            meta: {
              title: '月度结算查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/OrderManagement/MonthlySales')
          },
          {
            path: '/omSaleP/OrderManagement/RealNameAuthenticationQuery',
            meta: {
              title: '实名认证结果查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/OrderManagement/RealNameAuthenticationQuery')
          }
        ]
      },

      {
        path: '/omSaleP/HeadquartersInventory',
        meta: {
          title: '总部库存管理'
        },
        redirect: '/omSaleP/HeadquartersInventory',
        component: RouteView,
        children: [
          {
            path: '/omSaleP/HeadquartersInventory/AggregateQuery',
            meta: {
              title: '总部库存汇总查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/HeadquartersInventory/AggregateQuery')
          },

          {
            path: '/omSaleP/HeadquartersInventory/DetailsInquiry',
            meta: {
              title: '总部库存明细查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/HeadquartersInventory/DetailsInquiry')
          },
          {
            path: '/omSaleP/HeadquartersInventory/HeadquartersResources',
            meta: {
              title: '总部资源管理',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/HeadquartersInventory/HeadquartersResources')
          },
          {
            path: '/omSaleP/HeadquartersInventory/VehicleRegistration',
            meta: {
              title: '车籍查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/HeadquartersInventory/VehicleRegistration')
          }
        ]
      },

      {
        path: '/omSaleP/StoreInventory',
        meta: {
          title: '店端库存管理'
        },
        redirect: '/omSaleP/StoreInventory',
        component: RouteView,
        children: [
          {
            path: '/omSaleP/StoreInventory/DealerInventory',
            meta: {
              title: '经销商库存实时查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/StoreInventory/DealerInventory')
          }
        ]
      },
      {
        path: '/omSaleP/ActualSales',
        meta: {
          title: '终端管理'
        },
        redirect: '/omSaleP/ActualSales',
        component: RouteView,
        children: [
          {
            path: '/omSaleP/ActualSales/RetailOrders',
            meta: {
              title: '零售订单查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/ActualSales/RetailOrders')
          },
          {
            path: '/omSaleP/ActualSales/SalesQuery',
            meta: {
              title: '终端信息查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/ActualSales/SalesQuery')
          },
          {
            path: '/omSaleP/ActualSales/salesChangeApproval',
            meta: {
              title: '终端变更审批',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/ActualSales/salesChangeApproval')
          },
          {
            path: '/omSaleP/ActualSales/salesChangeQuery',
            meta: {
              title: '终端变更查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/ActualSales/salesChangeQuery')
          },
          {
            path: '/omSaleP/ActualSales/KeyCustomerActualSales',
            meta: {
              title: '大客户终端上报',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/ActualSales/KeyCustomerActualSales')
          },
          {
            path: '/omSaleP/ActualSales/salesMonthQuery',
            meta: {
              title: '月度终端量查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/ActualSales/salesMonthQuery')
          }
        ]
      },
      {
        path: '/omSaleP/KeyCustomers',
        meta: {
          title: '大客户订单管理'
        },
        redirect: '/omSaleP/KeyCustomers',
        component: RouteView,
        children: [
          {
            path: '/omSaleP/KeyCustomers/KeyCustomerInfo',
            meta: {
              title: '大客户报备',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/KeyCustomers/KeyCustomerInfo')
          },
          {
            path: '/omSaleP/KeyCustomers/KeyCustomerInfoVerify',
            meta: {
              title: '大客户报备审核',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/KeyCustomers/KeyCustomerInfoVerify')
          },
          {
            path: '/omSaleP/KeyCustomers/KeyCustomerInfoQuery',
            meta: {
              title: '大客户报备查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/KeyCustomers/KeyCustomerInfoQuery')
          },
          {
            path: '/omSaleP/KeyCustomers/OrderSubmission',
            meta: {
              title: '大客户订单提报',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/KeyCustomers/OrderSubmission')
          },
          {
            path: '/omSaleP/KeyCustomers/OrderReview',
            meta: {
              title: '大客户订单审核确认',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/KeyCustomers/OrderReview')
          },
          {
            path: '/omSaleP/KeyCustomers/OrderQuery',
            meta: {
              title: '大客户订单明细查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/KeyCustomers/OrderQuery')
          }
        ]
      },
      {
        path: '/omSaleP/VehicleAllocation',
        meta: {
          title: '车辆调拨管理'
        },
        redirect: '/omSaleP/VehicleAllocation',
        component: RouteView,
        children: [
          {
            path: '/omSaleP/VehicleAllocation/RegionalAudit',
            meta: {
              title: '车辆调拨区域审核',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/VehicleAllocation/RegionalAudit')
          },
          {
            path: '/omSaleP/VehicleAllocation/HeadquartersAudit',
            meta: {
              title: '车辆调拨总部审核',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/VehicleAllocation/HeadquartersAudit')
          },
          {
            path: '/omSaleP/VehicleAllocation/AllocationQuery',
            meta: {
              title: '车辆调拨查询',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/VehicleAllocation/AllocationQuery')
          }
        ]
      },
      {
        path: '/omSaleP/BigOrderRefund',
        meta: {
          title: '大定退款管理'
        },
        redirect: '/omSaleP/BigOrderRefund',
        component: RouteView,
        children: [
          {
            path: '/omSaleP/BigOrderRefund/BigOrderRefundApply',
            meta: {
              title: '大定退款申请',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/BigOrderRefund/BigOrderRefundApply')
          },
          {
            path: '/omSaleP/BigOrderRefund/AreaBigOrderRefundAudit',
            meta: {
              title: '区域大定退款审核',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/BigOrderRefund/AreaBigOrderRefundAudit')
          },
          {
            path: '/omSaleP/BigOrderRefund/AutoBigOrderRefundAudit',
            meta: {
              title: '车厂大定退款审核',
              keepAlive: true
            },
            component: AsyncComponent('omSaleP/BigOrderRefund/AutoBigOrderRefundAudit')
          },
        ]
      }
    ]
  }
];
export default menuRoutes;
